# Contributor: Antoine Martin (ayakael) <dev@ayakael.net>
# Maintainer: Antoine Martin (ayakael) <dev@ayakael.net>
pkgname=py3-opencontainers
_pyname=opencontainers
pkgver=0.0.14
pkgrel=2
arch="noarch"
pkgdesc="Python module for oci specifications"
url="https://pypi.python.org/project/opencontainers"
license="MPL-2.0"
depends="
	py3-requests
	"
makedepends="
	py3-setuptools
	py3-gpep517
	py3-wheel
	"
checkdepends="
	py3-pytest
	"
source="
	$pkgname-$pkgver.tar.gz::https://pypi.io/packages/source/o/opencontainers/opencontainers-$pkgver.tar.gz
	20_escape-url-slash-regex.patch
	21_use-raw-python-string-for-regex.patch
	"
builddir="$srcdir"/$_pyname-$pkgver
subpackages="$pkgname-pyc"

build() {
	gpep517 build-wheel \
		--wheel-dir .dist \
		--output-fd 3 3>&1 >&2
}

check() {
	pytest -v
}

package() {
	python3 -m installer -d "$pkgdir" \
		.dist/*.whl
}

sha512sums="
b0f0edb8d11c825e7bd64b0c38fb227823de0065dc35703cc930e5ad3a5c875abe5a8c8e16f34331ca2246f48887d34ab9749ca3b547216e0ece1aa7659dc845  py3-opencontainers-0.0.14.tar.gz
b81581cf9d19754a28fc8f30a200e34dc598c7c60ad8e908ff8574b0ccd5419ec21b684bc96adb007e1620c9b26f9dea988f3cb2edc49012d44ba62060d5696a  20_escape-url-slash-regex.patch
b1e53b2ef36d94e06835d80b372b884e10cc42fd478aa9a2ad20953744c068ff77922358f2522d21f0474974a48b5e4a5851a8c8b8482e337cbbdd2a0ae97b48  21_use-raw-python-string-for-regex.patch
"
